#Figure 3

#directory
#set working directory to the path PvP_Replication
#setwd("~/PvP_Replication")

#libraries
library(sf)
library(tidyverse)

#read in basemap of Colombia
col_shapefile <- st_read("PvP_data/country_shapefile/ne_10m_admin_0_countries.shp") %>% 
  dplyr::select(NAME, geometry) %>%
  filter(NAME == "Colombia")

#read in simulated trafficking routes
trafficking_routes <- st_read("PvP_data/trafficking_routes/trafficking_routes.shp")

#plot simulated trafficking routes
trafficking_route_plot <- ggplot() +
  geom_sf(data = col_shapefile, fill = "#E0E0E0", color = NA) +
  geom_sf(data = trafficking_routes, color = "darkred", lwd = 0.25) + 
  theme_void()

#save plot of simulated trafficking routes
ggsave(plot = trafficking_route_plot, filename="PvP_plots/trafficking_route_plot.pdf", width = 8.5,
       height = 11, units = "in")

#read in placebo routes
placebo_routes <- st_read("PvP_data/placebo_trafficking_routes/placebo_trafficking_routes.shp")

#plot placebo routes
placebo_route_plot <- ggplot() +
  geom_sf(data = col_shapefile, fill = "#E0E0E0", color = NA) +
  geom_sf(data = placebo_routes, color = "darkblue", lwd = 0.25) + 
  theme_void()

#save plot of placebo routes
ggsave(plot = placebo_route_plot, filename="PvP_plots/placebo_route_plot.pdf", width = 8.5,
       height = 11, units = "in")


